const { contextBridge, ipcRenderer } = require('electron')

const close = () => {
  ipcRenderer.invoke('on-close-event')
}

// 把方法暴露给渲染进程
contextBridge.exposeInMainWorld('myApi', {
  close
})
